{extend name="base"/}
{block name="resources"}
<style>
	.flex{display: flex;flex-wrap: wrap;}
	.flex .layui-form-item{width:50%}
	.ns-form-row{margin: 20px auto;}
	.layui-tab-brief li{border-bottom: 3px solid #FFFFFF;}
	.layui-tab-brief li.layui-this{border-bottom: 3px solid #ff6a00;}
	.panel-content { padding-left: 15px; box-sizing: border-box; }
	.ns-custom-panel .custom-panel-title .panel-content { width: calc(100% - 190px); }
	.ns-account-value, .ns-split { line-height: 34px; }
	.ns-custom-panel .custom-panel-from { display: flex; }
	.ns-custom-panel .custom-panel-from .layui-form-label{
		text-align: center;
	}
	.ns-custom-panel .custom-panel-from>div{
		text-align: center;
	}
	.ns-custom-panel .custom-panel-from .layui-form-item>div>span{
		margin-right: 10px;
	}
	.ns-custom-panel .custom-panel-from .layui-form-item>div>button{
		width: 20px;
		height: 20px;
		text-align: center;
		padding: 0;
		line-height: 20px;
		border:0;
		color:#FF6A00 ;
	}
	.layui-input-block + .layui-word-aux {
	    display: block;
	    margin-left: 100px;
	}
	.ns-shop-account {
		display: flex;
		align-items: center;
		position: relative;
		padding: 15px;
		box-sizing: border-box;
	}
	
	.ns-shop-detail p {
		display: inline-block;
		width: 300px;
		line-height: 30px;
	}
</style>
{/block}
{block name="main"}
<div class="fourstage-nav layui-tab layui-tab-brief" lay-filter="edit_user_tab">
<ul class="layui-tab-title">
	<li class="layui-this" lay-id="basic_info">基本信息</li>
</ul>
</div>
<div class="layui-form ns-form flex">
	<div class="layui-form-item">
		<label class="layui-form-label"><span class="required">*</span>用户名：</label>
		<div class="layui-input-block">
			<p class="ns-input-text ns-len-mid">{$member_info.data.username}</p>
		</div>
		<div class="ns-word-aux">用于登录，不可编辑</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label"><span class="required">*</span>昵称：</label>
		<div class="layui-input-block">
			<input name="nickname" type="text" lay-verify="required" value="{$member_info.data.nickname}" class="layui-input ns-len-long">
		</div>
		<div class="ns-word-aux">会员名称</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">手机号：</label>
		<div class="layui-input-block">
			<input name="mobile" type="text" lay-verify="mobile" value="{$member_info.data.mobile}" class="layui-input ns-len-long">
		</div>
		<div class="ns-word-aux">已进行手机号验证，请填写正确的手机号</div>
	</div>
	
	<div class="layui-form-item">
		<label class="layui-form-label">状态：</label>
		<div class="layui-input-block">
			<input type="checkbox" name="status" value="1" lay-skin="switch" {if condition="$member_info.data.status == 1"} checked {/if} lay-filter="status">
		</div>
		<div class="ns-word-aux">当状态处于关闭时，该会员则不能登录。</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label img-upload-lable ns-short-label">头像：</label>
		<div class="layui-input-inline">
			<div class="upload-img-block square">
				<div class="upload-img-box {if condition="$member_info.data.headimg"}hover{/if}">
					<div class="ns-upload-default" id="headImg">
						{if condition="$member_info.data.headimg"}
							<div id="preview_headImg" class="preview_img">
								<img layer-src src="{:img($member_info.data.headimg)}" class="img_prev"/>
							</div>
						{else/}
							<div class="upload">
								<img src="SHOP_IMG/upload_img.png" />
								<p>点击上传</p>
							</div>
						{/if}
					</div>
					<div class="operation"  >
						<div >
							<i title="图片预览" class="iconfont iconreview js-preview" style="margin-right: 20px;"></i>
							<i title="删除图片" class="layui-icon layui-icon-delete js-delete"></i>
						</div>
						
						<div class="replace_img js-replace">点击替换</div>
					</div>
					<input type="hidden" name="headimg" value="{$member_info.data.headimg}" />
				</div>
				<!-- <p id="headImg" class=" {if condition="$member_info.data.headimg"} replace {else/} no-replace{/if}">替换</p>
				
				<i class="del {if condition="$member_info.data.headimg"}show{/if}">x</i> -->
			</div>
		</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label"><span class="required">*</span>会员卡：</label>
		<div class="layui-input-inline ns-len-mid">
			<select class="member_level" name="member_level" lay-verify="required" lay-filter="member_level">
				<option value="">请选择</option>
				{volist name="member_level_list" id="member_level"}
				<option value="{$member_level.level_id}" {$member_info.data.member_level == $member_level.level_id ? 'selected' : '' } {if $member_level.level_type eq 1}disabled{/if}>{$member_level.level_name}</option>
				{/volist}
			</select>
		</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">性别：</label>
		<div class="layui-input-inline">
			<input type="radio" name="sex" value="0" title="未知" {$member_info.data.sex == 0 ? 'checked' : ''} lay-filter="sex">
			<input type="radio" name="sex" value="1" title="男" {$member_info.data.sex == 1 ? 'checked' : ''} lay-filter="sex">
			<input type="radio" name="sex" value="2" title="女" {$member_info.data.sex == 2 ? 'checked' : ''} lay-filter="sex">
		</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">生日：</label>
		<div class="layui-input-inline">
			<input name="birthday" type="text" id="laydate" value="" class="layui-input ns-len-mid">
		</div>
	</div>
	
	<!-- 隐藏域 -->
	<input type="hidden" name="member_id" value="{$member_info.data.member_id}" />
	<input type="hidden" class="birthday" value="{$member_info.data.birthday}" />
</div>
<div class="fourstage-nav layui-tab layui-tab-brief" lay-filter="edit_user_tab">
	<ul class="layui-tab-title">
		<li class="layui-this" lay-id="basic_info">账户明细</li>
		<li class="" lay-id="basic_info">订单管理</li>
		<li class="" lay-id="basic_info">会员地址</li>
		<li class="" lay-id="basic_info">收藏记录</li>
		<li class="" lay-id="basic_info">浏览记录</li>
	</ul>
	<div class="layui-tab-content">
	    <div class="layui-tab-item layui-show">
			<!-- <iframe src="{:url('shop/member/accountdetail',array('member_id'=>$member_info.data.member_id))}" style="width:100%;height:100vh;border:0"></iframe> -->
			<div class="ns-custom-panel">
			
			
				<div class="custom-panel-from ns-form">
					<div class="layui-form" lay-filter="pointForm">
						<div class="layui-form-item">
							<label class="layui-form-label">积分</label>
							<div>
								<span class="ns-len-short ns-account-value" id="member_point">{$member_info.data.point}</span>
								<button class="layui-btn layui-btn-primary layui-icon" onclick="savePoint(this)" data-num="{$member_info.data.point}">&#xe642;</button>
							</div>
						</div>
					</div>
			
					<div class="layui-form">
						<div class="layui-form-item">
							<label class="layui-form-label">余额（不可提现）</label>
							<div>
								
								<span class="ns-len-short ns-account-value" id="member_balance">{$member_info.data.balance}</span>
								<button class="layui-btn layui-btn-primary layui-icon" onclick="saveBalance(this)" data-num="{$member_info.data.balance}">&#xe642;</button>
							</div>
						</div>
					</div>
					
					<div class="layui-form">
						<div class="layui-form-item">
							
							<label class="layui-form-label">余额（可提现）</label>
							<div>
								<span class="ns-len-short ns-account-value" id="member_balance_money">{$member_info.data.balance_money}</span>
								<button class="layui-btn layui-btn-primary layui-icon" onclick="saveBalanceMoney(this)" data-num="{$member_info.data.balance_money}">&#xe642;</button>
							</div>
						</div>
					</div>
			
					<div class="layui-form">
						<div class="layui-form-item">
							<label class="layui-form-label">成长值</label>
							<div>
								<span class="ns-len-short ns-account-value" id="member_growth">{$member_info.data.growth}</span>
								<button class="layui-btn layui-btn-primary layui-icon" onclick="saveGrowth(this)" data-num="{$member_info.data.growth}">&#xe642;</button>
							</div>
							
						</div>
					</div>
				</div>
				
				<div class="ns-screen layui-collapse" lay-filter="selection_panel">
					<div class="layui-colla-item">
						<h2 class="layui-colla-title"></h2>
						<form class="layui-colla-content layui-form layui-show">
							<div class="layui-form-item">
								<div class="layui-inline">
								<label class="layui-form-label">账户类型：</label>
								<div class="layui-input-inline">
									<select name="account_type" lay-filter="account_type">
										<option value="">请选择</option>
										{foreach $account_type_arr as $account_type_arr_k => $account_type_arr_v}
										<option value="{$account_type_arr_k}">{$account_type_arr_v}</option>
										{/foreach}
									</select>
								</div>
								</div>
								<div class="layui-inline">
									<label class="layui-form-label">来源类型：</label>
									<div class="layui-input-inline">
										<select name="from_type" class="from_type">
											<option value="">请选择</option>
			
										</select>
									</div>
								</div>
								<div class="layui-inline">
									<label class="layui-form-label">发生时间：</label>
									<div class="layui-input-inline">
										<input type="text" class="layui-input" name="start_date" id="start_date" placeholder="开始时间" autocomplete="off" readonly>
									</div>
								</div>
								<div class="layui-inline">
									<div class="layui-input-inline ns-split">&nbsp;&nbsp;-&nbsp;&nbsp;</div>
									<div class="layui-input-inline ns-len-mid">
										<input type="text" class="layui-input" name="end_date" id="end_date" placeholder="结束时间" autocomplete="off" readonly>
									</div>
								</div>
							</div>
							<!-- <div class="layui-form-item">
								<div class="layui-inline">
								<label class="layui-form-label">发生时间：</label>
								<div class="layui-input-inline">
									<input type="text" class="layui-input" name="start_date" id="start_date" placeholder="开始时间" autocomplete="off" readonly>
								</div>
								<div class="layui-input-inline ns-split">&nbsp;&nbsp;-&nbsp;&nbsp;</div>
								<div class="layui-input-inline ns-len-mid">
									<input type="text" class="layui-input" name="end_date" id="end_date" placeholder="结束时间" autocomplete="off" readonly>
								</div>
								</div>
							</div> -->
			
							<input type="hidden" name="member_id" value="{$member_info.data.member_id}" id="member_id"/>
			
							<!-- 提交 -->
							<div class="ns-form-row" style="margin:0 !important;text-align: center;">
								<button class="layui-btn ns-bg-color" lay-submit lay-filter="search">筛选</button>
								<button type="reset" class="layui-btn layui-btn-primary">重置</button>
							</div>
						</form>
					</div>
				</div>
			</div>
			<table id="member_account" lay-filter="member_account"></table>
		</div>
	    <div class="layui-tab-item">
			<iframe src="{:url('shop/member/order',array('member_id'=>$member_info.data.member_id))}" style="width:100%;height:100vh;border:0"></iframe>
		</div>
	    <div class="layui-tab-item">
			<iframe src="{:url('shop/member/addressdetail',array('member_id'=>$member_info.data.member_id))}" style="width:100%;height:100vh;border:0"></iframe>
		</div>
	    <div class="layui-tab-item">
			<iframe src="{:url('shop/goods/membergoodscollect',array('member_id'=>$member_info.data.member_id))}" style="width:100%;height:100vh;border:0"></iframe>
		</div>
	    <div class="layui-tab-item">
			<iframe src="{:url('shop/goods/membergoodsbrowse',array('member_id'=>$member_info.data.member_id))}" style="width:100%;height:100vh;border:0"></iframe>
		</div>
	  </div>
</div>

{/block}
{block name="script"}
<script>
	var birthday = $(".birthday").val();
	$("input[name=birthday]").attr("value", ns.time_to_date(birthday, "YYYY-MM-DD"));
	
	layui.use(['form', 'laydate'], function() {
		var form = layui.form,
			laydate = layui.laydate,
			repeat_flag = false; //防重复标识
		form.render();

		laydate.render({
			elem: '#laydate',
			done: function(){
				editMember();
			}
		});

		form.on('switch(status)', function(data){
			editMember();
		}); 

		form.on('radio(sex)', function(data){
			editMember();
		}); 

		form.on('select(member_level)', function(data){
			layer.confirm('是否确定变更该客户的会员卡？',{title: '会员卡变更确认'}, function(index){
                $.ajax({
                    type: "POST",
                    url: ns.url("shop/member/changememberlevel"),
                    data: {
                        level_id: data.value,
						member_id: '{$member_info.data.member_id}'
					},
                    dataType: 'JSON',
                    success: function(res) {
                        if (res.code == 0) {
                           layer.closeAll();
                        } else {
                            layer.msg(res.message);
						}
                    }
                });
            });
		}); 


		var upload = new Upload({
			elem: '#headImg',
			callback: function(){
				editMember();
			}
		});

		$('[name="mobile"],[name="headimg"],[name="nickname"]').change(function(){
			editMember();
		})

		function editMember(){
			if(repeat_flag) return false;
			repeat_flag = true;

			var data = {
				birthday: $('[name="birthday"]').val(),
				status: $('[name="status"]').is(':checked') ? 1 : 0,
				sex: $('[name="sex"]:checked').val(),
				mobile: $('[name="mobile"]').val(),
				nickname: $('[name="nickname"]').val(),
				headimg: $('[name="headimg"]').val(),
				member_id: '{$member_info.data.member_id}'
			};
			var reg = {
				required: /[\S]+/,
				mobile: /^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/
			};

			if (!reg.required.test(data.mobile) || !mobileReg.test(data.mobile)) delete data.mobile;
			if (!reg.required.test(data.nickname)) delete data.nickname;

			$.ajax({
				url: ns.url("shop/member/editMember"),
				data: data,
				dataType: 'JSON', //服务器返回json格式数据
				type: 'POST', //HTTP请求类型
				success: function(res) {
					repeat_flag = false;
					if (res.code != 0) {
						layer.msg(res.message);
					}
				}
			});
		}

	});
	
	function back() {
		location.href = ns.url("shop/member/memberList");
	}
</script>
<script>
	var date = {$member_info.data.reg_time};
	$(".reg-time").text(ns.time_to_date(date, "YYYY-MM-DD"));
	$("#member_point").text(parseInt("{$member_info.data.point}"));

	var form,
		table,
		laydate,
		laytpl;
		repeat_flag = false, //防重复标识
		currentDate = new Date(),
		minDate = "";
	
	currentDate.setDate(currentDate.getDate() - 7);
	
	layui.use(['form', 'laydate', 'laytpl'], function() {
		form = layui.form;
		laydate = layui.laydate;
		laytpl = layui.laytpl;
		form.render();

		//开始时间
		laydate.render({
			elem: '#start_date',
			type: 'datetime'
		});
		
		//结束时间
		laydate.render({
			elem: '#end_date',
			type: 'datetime'
		});

        //根据账户类型获取来源类型
        form.on('select(account_type)', function (data) {

            $.ajax({
                type: "POST",
                url: ns.url("shop/member/getfromtype"),
                data: {type:data.value},
                dataType: 'JSON',
                success: function(res) {

                    var html = '<option value="">请选择</option>';
                    $.each(res,function(k,v){
                        html += '<option value="'+k+'">'+v.type_name+'</option>';
                    });

                    $('.from_type').html(html);
					form.render();
                }
            });
        });

		/**
		 * 重新渲染结束时间
		 * */
		function reRender() {
			$("#reg_end_date").remove();
			$(".end-time").html('<input type="text" class="layui-input" name="reg_end_date" id="reg_end_date" placeholder="请输入结束时间">');
			laydate.render({
				elem: '#reg_end_date',
				min: minDate
			});
		}

		/**
		 * 加载表格
		 */
		table = new Table({
			elem: '#member_account',
			url: ns.url("shop/member/accountDetail"),
			where:{
			    member_id : $("#member_id").val(),
			},
			cols: [
				[{
					field: 'account_type_name',
					title: '账户类型',
					width: '15%',
					unresize: 'false'
				}, {
					title: '数据金额',
					width: '15%',
					unresize: 'false',
					templet: function (d) {
						return d.account_type = "point" ? parseInt(d.account_data) : d.account_data;
					}
				}, {
					field: 'type_name',
					title: '发生方式',
					width: '15%',
					unresize: 'false'
				}, {
					field: 'remark',
					title: '备注',
					width: '35%',
					unresize: 'false'
				}, {
					field: 'create_time',
					title: '发生时间',
					width: '20%',
					unresize: 'false',
					templet: function(data) {
						return ns.time_to_date(data.create_time);
					}
				}]
			]
		});
		
		/**
		 * 表单验证
		 */
		form.verify({
			num: function(value) {
				var arrMen = value.split(".");
				var val = 0;
				if (arrMen.length == 2) {
					val = arrMen[1];
				}
				
				if (value == "") {
					return false;
				}
				if (val.length > 2) {
					return '保留小数点后两位'
				}
			}
		});
		
		/**
		 * 监听提交
		 */
		form.on('submit(search)', function(data) {
			table.reload({
				page: {
					curr: 1
				},
				where: data.field
			});
			return false;
		});
		
		form.on('submit(savePoint)', function(data) {
			if (repeat_flag) return false;
			repeat_flag = true;
			var point = {$member_info.data.point};
			if (data.field.adjust_num == 0) {
				layer.msg('调整数值不能为0');
				repeat_flag = false;
				return ;
			}
			if (point*1 + data.field.adjust_num*1 < 0) {
				layer.msg('积分不可以为负数');
				repeat_flag = false;
				return ;
			}
			$.ajax({
				type: "POST",
				url: ns.url("shop/member/adjustPoint"),
				data: data.field,
				dataType: 'JSON',
				success: function(res) {
					layer.msg(res.message);
					repeat_flag = false;
					
					if (res.code == 0) {
						$("#member_point").html(res.data.point);
						$("#member_point").next().attr('data-num', res.data.point);
						layer.closeAll('page');
						table.reload();
					}
				}
			});
		});
		
		form.on('submit(saveBalance)', function(data) {
			if (repeat_flag) return false;
			repeat_flag = true;
			var balance = {$member_info.data.balance};
			if (data.field.adjust_num == 0) {
				layer.msg('调整数值不能为0');
				repeat_flag = false;
				return ;
			}
			if (balance*1 + data.field.adjust_num*1 < 0) {
				layer.msg('当前余额（不可提现）不可以为负数');
				repeat_flag = false;
				return ;
			}
			$.ajax({
				type: "POST",
				url: ns.url("shop/member/adjustBalance"),
				data: data.field,
				dataType: 'JSON',
				success: function(res) {
					layer.msg(res.message);
					repeat_flag = false;
					
					if (res.code == 0) {
						$("#member_balance").html(res.data.balance);
						$("#member_balance").next().attr('data-num', res.data.balance);
						layer.closeAll('page');
						table.reload();
					}
				}
			});
		});
		
		form.on('submit(saveBalanceMoney)', function(data) {
			if (repeat_flag) return false;
			repeat_flag = true;
			var balance = {$member_info.data.balance_money};
			if (data.field.adjust_num == 0) {
				layer.msg('调整数值不能为0');
				repeat_flag = false;
				return ;
			}
			if (balance*1 + data.field.adjust_num*1 < 0) {
				layer.msg('余额(可提现)不可以为负数');
				repeat_flag = false;
				return ;
			}
			$.ajax({
				type: "POST",
				url: ns.url("shop/member/adjustBalanceMoney"),
				data: data.field,
				dataType: 'JSON',
				success: function(res) {
					layer.msg(res.message);
					repeat_flag = false;
					
					if (res.code == 0) {
						$("#member_balance_money").html(res.data.balance_money);
						$("#member_balance_money").next().attr('data-num', res.data.balance_money);
						layer.closeAll('page');
						table.reload();
					}
				}
			});
		});
		
		form.on('submit(saveGrowth)', function(data) {
			if (repeat_flag) return false;
			repeat_flag = true;
			var growth = {$member_info.data.growth};
			if (data.field.adjust_num == 0) {
				layer.msg('调整数值不能为0');
				repeat_flag = false;
				return ;
			}
			if (growth*1 + data.field.adjust_num*1 < 0) {
				layer.msg('成长值不可以为负数');
				repeat_flag = false;
				return;
			}
			$.ajax({
				type: "POST",
				url: ns.url("shop/member/adjustGrowth"),
				data: data.field,
				dataType: 'JSON',
				success: function(res) {
					layer.msg(res.message);
					repeat_flag = false;
					
					if (res.code == 0) {
						$("#member_growth").html(res.data.growth);
						$("#member_growth").next().attr('data-num', res.data.growth);
						layer.closeAll('page');
						table.reload();
					}
				}
			});
		});
	});
	
	function savePoint(e) {
		var point = $(e).attr('data-num');
		var data = {
			point : point
		};
		laytpl($("#point").html()).render(data, function(html) {
			layer.open({
				title: '调整积分',
				skin: 'layer-tips-class',
				type: 1,
				area: ['800px'],
				content: html
			});
		});


		$(".integral-bounced .amount input").on("input propertychange",function(val){
			var newIntegral = parseInt($(this).val());
			$(this).val(newIntegral);
			var currIntegral = parseInt($(".integral-bounced .ns-account-value").text());

			if (newIntegral + currIntegral < 0){
				layer.msg("调整数额与当前值积分数相加不能小于0");
				$(this).val(-currIntegral);
				return false;
			}

		})
	}
	
	function saveBalance(e) {
		var balance = $(e).attr('data-num');
		var data = {
			balance : balance
		};
		laytpl($("#balance").html()).render(data, function(html) {
			layer.open({
				title: '调整余额（不可提现）',
				skin: 'layer-tips-class',
				type: 1,
				area: ['800px'],
				content: html
			});
		});
	}
	
	function saveBalanceMoney(e) {
		var balance_money = $(e).attr('data-num');
		var data = {
			balance_money : balance_money
		};
		laytpl($("#balance_money").html()).render(data, function(html) {
			layer.open({
				title: '调整余额（可提现）',
				skin: 'layer-tips-class',
				type: 1,
				area: ['800px'],
				content: html
			});
		});
	}
	
	function saveGrowth(e) {
		var growth = $(e).attr('data-num');
		var data = {
			growth : growth
		};
		laytpl($("#growth").html()).render(data, function(html) {
			layer.open({
				title: '调整成长值',
				skin: 'layer-tips-class',
				type: 1,
				area: ['800px'],
				content: html
			});
		});
	}
</script>
<!-- 积分弹框html -->
<script type="text/html" id="point">
	<div class="layui-form integral-bounced">
		<div class="layui-form-item">
			<label class="layui-form-label">当前积分：</label>
			<div class="layui-input-block ns-account-value">{{ parseInt(d.point) }}</div>
		</div>
		
		<div class="layui-form-item">
			<label class="layui-form-label">调整数额：</label>
			<div class="layui-input-block amount">
				<input type="number" value="0" placeholder="请输入调整数额" name="adjust_num" lay-verify="num" class="layui-input ns-len-short">
			</div>
			<span class="ns-word-aux">调整数额与当前积分数相加不能小于0</span>
		</div>
		
		<div class="layui-form-item">
			<label class="layui-form-label">备注：</label>
			<div class="layui-input-block ns-len-long">
				<textarea class="layui-textarea" name="remark" placeholder="请输入备注"></textarea>
			</div>
		</div>
		
		<div class="ns-form-row" style="margin-left: 200px;">
			<button class="layui-btn ns-bg-color" lay-submit lay-filter="savePoint">确定</button>
		</div>
		
		<input type="hidden" name="member_id" value="{$member_info.data.member_id}" />
		<input type="hidden" name="point" value="{{ d.point }}" />
	</div>
</script>

<!-- 余额弹框html -->
<script type="text/html" id="balance">
	<div class="layui-form">
		<div class="layui-form-item">
			<label class="layui-form-label">当前余额（不可提现）：</label>
			<div class="layui-input-block ns-account-value">{{ d.balance }}</div>
		</div>
		
		<div class="layui-form-item">
			<label class="layui-form-label">调整数额：</label>
			<div class="layui-input-block">
				<input type="number" value="0" placeholder="请输入调整数额" name="adjust_num" lay-verify="num" class="layui-input ns-len-short">
			</div>
			<span class="ns-word-aux">调整数额与当前不可提现余额相加不能小于0</span>
		</div>
		
		<div class="layui-form-item">
			<label class="layui-form-label">备注：</label>
			<div class="layui-input-block ns-len-long">
				<textarea class="layui-textarea" name="remark" placeholder="请输入备注"></textarea>
			</div>
		</div>
		
		<div class="ns-form-row" style="margin-left: 200px;">
			<button class="layui-btn ns-bg-color" lay-submit lay-filter="saveBalance">确定</button>
		</div>
		
		<input type="hidden" name="member_id" value="{$member_info.data.member_id}" />
		<input type="hidden" name="point" value="{{ d.balance }}" />
	</div>
</script>

<!-- 余额（可提现）弹框html -->
<script type="text/html" id="balance_money">
	<div class="layui-form">
		<div class="layui-form-item">
			<label class="layui-form-label">当前余额（可提现）：</label>
			<div class="layui-input-block ns-account-value">{{ d.balance_money }}</div>
		</div>
		
		<div class="layui-form-item">
			<label class="layui-form-label">调整数额：</label>
			<div class="layui-input-block">
				<input type="number" value="0" placeholder="请输入调整数额" name="adjust_num" lay-verify="num" class="layui-input ns-len-short">
			</div>
			<span class="ns-word-aux">调整数额与当前可提现余额相加不能小于0</span>
		</div>
		
		<div class="layui-form-item">
			<label class="layui-form-label">备注：</label>
			<div class="layui-input-block ns-len-long">
				<textarea class="layui-textarea" name="remark" placeholder="请输入备注"></textarea>
			</div>
		</div>
		
		<div class="ns-form-row" style="margin-left: 200px;">
			<button class="layui-btn ns-bg-color" lay-submit lay-filter="saveBalanceMoney">确定</button>
		</div>
		
		<input type="hidden" name="member_id" value="{$member_info.data.member_id}" />
		<input type="hidden" name="point" value="{{ d.balance_money }}" />
	</div>
</script>

<!-- 成长值弹框html -->
<script type="text/html" id="growth">
	<div class="layui-form">
		<div class="layui-form-item">
			<label class="layui-form-label">当前成长值：</label>
			<div class="layui-input-block ns-account-value">{{ d.growth }}</div>
		</div>
		
		<div class="layui-form-item">
			<label class="layui-form-label">调整数额：</label>
			<div class="layui-input-block">
				<input type="number" value="0" placeholder="请输入调整数额" name="adjust_num" lay-verify="num" class="layui-input ns-len-short">
			</div>
			<span class="ns-word-aux">调整数额与当前成长值相加不能小于0</span>
		</div>
		
		<div class="layui-form-item">
			<label class="layui-form-label">备注：</label>
			<div class="layui-input-block ns-len-long">
				<textarea class="layui-textarea" name="remark" placeholder="请输入备注"></textarea>
			</div>
		</div>
		
		<div class="ns-form-row" style="margin-left: 200px;">
			<button class="layui-btn ns-bg-color" lay-submit lay-filter="saveGrowth">确定</button>
		</div>
		
		<input type="hidden" name="member_id" value="{$member_info.data.member_id}" />
		<input type="hidden" name="point" value="{{ d.growth }}" />
	</div>
</script>
{/block}